]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
calendar: Do not overload :active to mark selected day
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 8 Jul 2016 00:06:31 +0000 (02:06 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 8 Jul 2016 14:11:43 +0000 (16:11 +0200)
We currently use the :active pseudo class to mark the selected day
in the calendar. Whenever the selected date changes, the class is
added to the corresponding button and removed from all others.
However when the selected date doesn't change (i.e. when clicking
the already selected date), the buttons are not updated and the
use of the :active class conflicts with StButton's builtin handling
of the class - the class is removed on the button up event and the
button is deselected.
Fix this by simply using a different pseudo class.

https://bugzilla.gnome.org/show_bug.cgi?id=746867

data/theme/gnome-shell-high-contrast.css
data/theme/gnome-shell-sass
data/theme/gnome-shell.css
js/ui/calendar.js

index bb1255a17c53c35b4946f67d161e55cbaab6f618..190aef52359d1a0c87e18591f3a66ae0bf5c1e79 100644 (file)
@@ -769,7 +769,7 @@ StScrollBar {
   border-radius: 1.4em; }
   .calendar-day-base:hover, .calendar-day-base:focus {
     background-color: #0d0d0d; }
-  .calendar-day-base:active {
+  .calendar-day-base:active, .calendar-day-base:selected {
     color: white;
     background-color: #215d9c;
     border-color: transparent; }
index 31aac7f7b524786965e4c9a1890009ea362b9c87..d184e5c44ed824ab62fc35a4a8d75cda1f387206 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 31aac7f7b524786965e4c9a1890009ea362b9c87
+Subproject commit d184e5c44ed824ab62fc35a4a8d75cda1f387206
index d3155edf10727934c70941df7d6b893c3624c842..5b61359405110dbcb0e1bd706435f03e3cb82cad 100644 (file)
@@ -769,7 +769,7 @@ StScrollBar {
   border-radius: 1.4em; }
   .calendar-day-base:hover, .calendar-day-base:focus {
     background-color: #454c4c; }
-  .calendar-day-base:active {
+  .calendar-day-base:active, .calendar-day-base:selected {
     color: white;
     background-color: #215d9c;
     border-color: transparent; }
index 7958e9d16fc4096c9ace89523b3e1e050a5a32fe..ec3732e00e639bc15082d19a3c2465e9b0d6f8f9 100644 (file)
@@ -686,12 +686,12 @@ const Calendar = new Lang.Class({
 
         this._buttons.forEach(Lang.bind(this, function(button) {
             if (sameDay(button._date, this._selectedDate)) {
-                button.add_style_pseudo_class('active');
+                button.add_style_pseudo_class('selected');
                 if (this._shouldDateGrabFocus)
                     button.grab_key_focus();
             }
             else
-                button.remove_style_pseudo_class('active');
+                button.remove_style_pseudo_class('selected');
         }));
     }
 });